package com.mach.platform.domain.iot;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author Administrator
 * @Description:
 * @Package: com.mach.platform.domain.iot
 * @time 2018/11/22 0022 14:44
 */
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
@Entity
@Table(name = "iot_limit")
@Data
public class IotLimit implements Serializable {
	private static final long serialVersionUID = -7726859601515571174L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	/**
	 * 对应的属性id
	 */
	@OneToOne(targetEntity = IotCollItem.class, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "coll_id")
	private IotCollItem iotCollItem;

	/**
	 * 基准值
	 */
	@Column(name = "base_value")
	private double baseValue;

	/**
	 * 下限值
	 */
	@Column(name = "low_limit")
	private double lowLimit;

	/**
	 * 上下值
	 */
	@Column(name = "upper_limit")
	private double upperLimit;


}
